﻿#ifndef FLYWEIGHTFACTORY_H
#define FLYWEIGHTFACTORY_H

#include <QString>
#include <QMap>

class Flyweight;

typedef QMap<QString, Flyweight*> FlyweightMap;

class FlyweightFactory
{
public:
    static FlyweightFactory* getInstance();

    Flyweight* getFlyweight(QString key);

private:
    explicit FlyweightFactory();

    static FlyweightFactory* m_pSelf;

    FlyweightMap m_flyweightMap;
};

#endif // FLYWEIGHTFACTORY_H
